dir

Displays the contents of a directory.
   dir [d:][path][file] [options]

Options

  d:path\file
  A specific file to display.

  /p
  Displays one page of the listing at a time.

  /w
  Displays the listing in wide format.

  /a[:attribs]
  Displays only the files and directories with the specified
  attributes.  Default is /a:hsdar.  You may use the following for
  attribs:
    h | -h
    Hidden files.  -h for files that are not hidden.

    s | -s
    System files.  -s for files that are not system files.

    d | -d
    Directories.  -d for files.

    a | -a
    Files with the archive bit.  -a for files without the archive bit.

    r | -r
    Read-only files.  -r for files that are not read-only.

  /o[:order]
  Displays the listing in the specified order. You may use the
  following to specify the sort order:
    a | -a
    Sort alphabetically A-Z.  -a to sort Z-A.

    e | -e
    Sort by extension A-Z.  -a to sort by extension Z-A.

    d | -d
    Sort by date and time.  -d to sort in reverse order.

    s | -s
    Sort by size, smallest-biggest.  -s to sort biggest-smallest.

    g | -g
    Group directories first.  -g to group directories last.

  /s
  List every occurrence in all subdirectories.

  /b
  Bare format. Lists one name per line.

  /L
  Displays names in lowercase.

Notes

To customise the default appearance for dir, use the DIRCMD environment variable. For instance:
   set DIRCMD=/w/p
To override something set in DIRCMD, use a hypen on that switch at the command line. (for example /-w)
Copyright © 1998 Jim Hall
This file is derived from the FreeDOS Spec Command HOWTO. See the file H2Cpying.txt for copying conditions.